This invention relates to conversion tables that may be used in applications such as image reproduction devices. For example, the invention may be used for gamma correction of luminance (light) or chrominance (color) values in the display of images.
Digital images are made up of a plurality of discrete, regularly spaced points (pixels) in an image plane. Each pixel is given a set of three, eight-bit values representing red, green, and blue intensities. Digital images are defined by the pixels in the image plane. Typically, image data consists of sets of three, eight-bit values for each pixel location. Video images are often represented by eight-bit luminance values and one or more color-difference (chrominance) values.
Conversion of images from one physical or logical representation to another, such as by scanning a printed image into a computer memory or converting between digital formats, often results in a particular distortion of the relationship between, for example, the luminance of a color component and the numerical representation of the component, or vice-versa. This occurs, for example, when a computer image, stored as a set of chrominance values in the range 0 to 255, is displayed on a computer monitor screen or printed. The actual luminance produced by the pixels in the image will not correspond linearly to the values in the computer memory. In this case, the luminance values produced by the display often bear a power relationship to the values in the computer memory, of the form
L(x,y)=Lmax(N(x,y)/Nmax)xcex3xe2x80x83xe2x80x83(1)
where N(x, y) is the numerical value at location (x, y), Nmax is the maximum numerical value of the representation, Lmax is the luminance corresponding to the maximum numerical value, and L(x, y) is the luminance value to location (x, y). The coefficient xcex3 is the power exponent describing the relationship. The transformation described by equation (1) is commonly called gamma correction in the imaging literature. The value of the coefficient xcex3 varies with the type of display or the physical nature of the reproduction process. For example, for television CRT displays, the relationship between the applied voltage and the resulting luminance is a gamma function with value xcex3≈2.2.
In analog systems, a nonlinear electronic circuit generates the gamma correction transformation. Exemplary prior art that uses electronic circuits to perform gamma conversion includes U.S. Pat. No. 4,783,703 to Murakoshi et al. entitled xe2x80x9cTelevision Flicker Preventing Circuit With Gamma Value Conversion Prior To Field-To-Frame Conversion,xe2x80x9d and U.S. Pat. No. 5,057,919 to de Haan et al. entitled xe2x80x9cPicture Signal Interpolation Circuit With Gamma Compensation.xe2x80x9d
For digital systems, the direct computation of the power function is typically too complex for real-time implementation, so that the transformation is often precomputed, with the input/output relationship stored in a lookup table with one entry for each discrete value of the input variable. The transformation is performed on a pixel-by-pixel basis by reference to this table. An exemplary prior art reference that uses a lookup table to perform gamma conversion is U.S. Pat. No. 5,363,318 to McCauley entitled xe2x80x9cMethod And Apparatus For Adaptive Color Characterization And Calibration.xe2x80x9d Similarly, U.S. Pat. No. 5,258,783 to Sasanuma et al., entitled xe2x80x9cImage Processing Method And Apparatus With Gamma-Correction Control,xe2x80x9d discloses the creation of a gamma correction table by direct measurement of the output of an image processing device (a copier or printer) with a photosensor, and construction of the correction table from the results. Still further, U.S. Pat. No. 5,566,372 to Ikeda et al., entitled xe2x80x9cImage Forming Apparatus And Method Having Gradation Control In A Dense Area In Which Gradation Characteristics Are Non-Linear,xe2x80x9d discloses the creation of a conversion table based upon direct measurement of the input/output characteristics.
When only one value of xcex3 is utilized within a system, the table approach is efficient and effective. When xcex3 can be varied by the user of the system, however, the table approach becomes problematic, since the values in the table must be changed whenever the gamma (xcex3) coefficient is changed. Problems may include, for example, time consuming computations and/or resource (memory or processor) hungry computations.
In some systems, a multiplicity of tables are precomputed, and the choices of xcex3 are limited to those preselected values. One such system is disclosed in U.S. Pat. No. 5,589,954 to Watanabe, entitled xe2x80x9cxcex3-Correction Curve Selecting Apparatus And A xcex3-Correction Curve Creating Apparatus.xe2x80x9d The Watanabe disclosure sets forth a gamma correction curve generating system, of unspecified form, that generates a plurality of correction curves, and an apparatus which selects among the curves for the most suitable curve. In some systems the conversion table may be recomputed whenever xcex3 is changed, but this requires the inclusion into the system of software or hardware to perform complex transcendental mathematical functions.
The current invention permits the computation of a gamma conversion table using a simplified mathematical formula, the coefficients of which are computed from stored coefficients. The method requires a minimum number of stored values, but can compute the gamma conversion table, to reasonable accuracy, for any value of gamma in a wide range, using simplified formulae.
Specifically, an efficient method of computing gamma correction tables of the present invention includes the first step of determining a gamma correction equation between luminance values produced between two representations. The next step is to determine at least one polynomial approximation to the gamma correction equation, the at least one polynomial approximation having coefficient values ci. For each coefficient value cI, the next step is to group together all of the coefficient values over a range of xcex3 and then to fit a polynomial equation to each grouping to get a respective coefficient polynomial equation. Then coefficients for a given value of xcex3 are computed using the coefficient polynomial equations. The next step is to compute gamma conversion transformations using the computed coefficients and a simplified mathematical formula. Finally, the computed gamma conversion transformations are stored in a gamma correction table.
In a general application of the present invention the efficient method computes conversion tables generally. Specifically, the general method includes the step of determining a non-linear transform between input values in a first range and output values in a second range, the non-linear transform having at least one adjustable parameter. Next at least one approximation equation to the non-linear transform, having coefficient values ci, is determined. Then, for each coefficient value ci, all of the coefficient values over a range of the at least one adjustable parameter are grouped together and an approximation to each grouping is fit to get a respective coefficient approximation equation. Coefficients for a given value of the at least one adjustable parameter are then computed using the coefficient approximation equations. Conversion transformations are then computed using the computed coefficients and a simplified mathematical formula. Finally, the computed conversion transformations are stored in a conversion table.